#include "driverh.h"

#ifndef _syslib_h_
#define _syslib_h_

#ifdef   __cplusplus
extern   "C"   {
#endif

#define SafeMalloc(size) SafeMalloc_T(size, __FILE__, __LINE__)
void *SafeMalloc_T(INT16U size, char *file, int line);
void TraceMallocMemState(void);

#define SafeMallocA(size) SafeMalloc_T(size, __FILE__, __LINE__)

#define SafeCalloc(size) SafeCalloc_T(size, __FILE__, __LINE__)
void *SafeCalloc_T(INT16U size, char *file, int line);

void SafeFree(void *p);
void SafeFreeA(void *p);

void SafeMemCpy(INT8U *dest, INT8U *src, INT16U size);
void Sleep(INT32U mm);

#ifdef   __cplusplus
}
#endif

#endif
